###################动作组################
actionGroup = {"go_straight" : '1_.',#直走
"turn_left" : 'little_turnleft',#原地左转
"turn_right" : 'little_turnright',#原地右转
"attention" : "0",#立正
"change_PWM" : "change_PWM",#更改云台
"strafe_left":"11",#左平移
"strafe_right":"12",#右平移
###台阶关卡###
"step_up" : "shangtaijie",#上台阶
"step_down" : "xiataijie",#下台阶
###地雷关卡###
"right_bypass":"right_bypass", #右穿过地雷
"left_bypass":"left_bypass", #左穿过地雷
###挡板关卡###
"pass_baffle":"pass_baffle",
###独木桥关卡###
"turn":"quarter_turn",#直角转弯
###急救动作###
"turnLeft_up55":"turnLeft_up55",#左转*2平移*2
"turnLeft_40to55":"turnLeft_40to55",#左转*3平移*2
"turnLeft_down40":"turnLeft_down40",#左转*4平移*2
"turnRight_up55":"turnRight_up55",#右转*2平移*2
"turnRight_40to55":"turnRight_40to55",#右转*3平移*2
"turnRight_down40":"turnRight_down40"}#右转*4平移*2
#########颜色字典##########
color_range = {'red_low': [(0,43,46), (10, 255, 255)],
               'red_high': [(156,43,46),(180,255,255)],
              'blue': [(102,50,50), (130, 255,255)],
              'green': [(35,43,46), (77, 255, 255)],
              'orange': [(11,43,46), (25, 255, 255)],
              'yellow': [(26,43,46), (34, 255, 255)],
              }
black = [(70,50,0), (180, 255, 46)]
######颜色-关卡映射表#####
colorMission = {
    "red_low":"step",
    "red_high":"step",
    "green":"single_bridge",
    "orange":"pit",
    "yellow":"pit"
    }
#########全局变量表########
c = 80
globalVal = {"resize_width": 4*c,
             "resize_height":3*c,
             "selfPoint":[2*c,int(1.5*c)]
    }
MissionTable = ["single_gate",#开始关卡，单匝口
                "color_gate",#三巨头，需要识别
                "mine",#地雷关卡
                "baffle",#挡板关卡
                "turn",#直角左转
                "door",#大门
                "color_gate",#三巨头，需要识别
                "football",#踢球
                "turn",#直角转弯
                "color_gate",#三巨头，需要识别
                "gully",#沟壑关卡
                "double_gate"#终点双匝口
    ]


###########################
##########阈值表###########

###########################
def getActionGroup():
    return actionGroup
def getColorRange(item):
    if item < 0:
        return color_range
    else:
        return color_range[item]

def getVal(valName):
    return globalVal[valName]

def getColorMission():
    return colorMission
